import { mingzu } from '/@/views/app/demo/user/nations';
import { FormSchema }  from '/@/components/Form/index'
import { gender } from './gender';
export const userschemas: FormSchema[] = [
  {
    field: 'name',
    component: 'Input',
    label: '姓名',
    required:true,
    colProps: {
      span: 8,
    },
  },
  {
    field: 'gender',
    component: 'RadioGroup',
    label: '性别',
    // required:true,
    colProps: {
      span: 8,
    },
    componentProps: {
      options:gender
    },
  },

  {
    field: 'nation',
    component: 'Select',
    label: '民族',
    colProps: {
      span: 8,
    },
    defaultValue: '汉族',
    componentProps: {
        options: mingzu,
      },
    required:true,
  },
  {
    field: 'birthday',
    component: 'DatePicker',
    label: '生日',
    colProps: {
      span: 8,
    },
    defaultValue: new Date().setFullYear(new Date().getFullYear() - 20 ),
  },
  {
    field: 'id',
    component: 'Input',
    label: '身份证号',
    required:true,
    colProps: {
      span: 8,
    },
  },
  {
    field: 'email',
    component: 'Input',
    label: '邮箱',
    colProps: {
      span: 8,
    },
      componentProps: {
      placeholder: 'user@domain.com',
      onChange: (e: any) => {
        console.log(e);
      },
    },

  },
   {
    field: 'qq',
    component: 'Input',
    label: 'QQ号',
    colProps: {
      span: 8,
    },
    required:true,
  },
   {
    field: 'mobile',
    component: 'Input',
    label: '手机号',
    required:true,
    colProps: {
      span: 8,
    },
  },
   {
    field: 'wechat',
    component: 'Input',
    label: '微信号',
    colProps: {
      span: 8,
    },
    required:true,
  },
   {
    field: 'speciality',
    component: 'InputTextArea',
    label: '特长',
    colProps: {
      span: 8,
    },
    required:true,
  },

];

export const userschemas12: FormSchema[] = [
  {
    field: 'name',
    component: 'Input',
    label: '姓名',
    required:true,
    colProps: {
      span: 8,
    },
  },
  {
    field: 'gender',
    component: 'RadioGroup',
    label: '性别',
    // required:true,
    colProps: {
      span: 8,
    },
    componentProps: {
      options:gender
    },
  },

  {
    field: 'nation',
    component: 'Select',
    label: '名族',
    colProps: {
      span: 8,
    },
    defaultValue: '汉族',
    componentProps: {
        options: mingzu,
      },
  },
  {
    field: 'birthday',
    component: 'DatePicker',
    label: '生日',
    colProps: {
      span: 8,
    },
    defaultValue: new Date().setFullYear(new Date().getFullYear() - 20 ),
  },
  {
    field: 'id',
    component: 'Input',
    label: '身份证号',
    required:true,
    colProps: {
      span: 8,
    },
    dynamicDisabled: (true)
  },
  {
    field: 'email',
    component: 'Input',
    label: '邮箱',
    colProps: {
      span: 8,
    },
      componentProps: {
      placeholder: 'user@domain.com',
      onChange: (e: any) => {
        console.log(e);
      },
    },
  },
   {
    field: 'qq',
    component: 'Input',
    label: 'QQ号',
    colProps: {
      span: 8,
    },
  },
   {
    field: 'mobile',
    component: 'Input',
    label: '手机号',
    required:true,
    colProps: {
      span: 8,
    },
  },
   {
    field: 'wechat',
    component: 'Input',
    label: '微信号',
    colProps: {
      span: 8,
    },
  },
   {
    field: 'speciality',
    component: 'InputTextArea',
    label: '特长',
    colProps: {
      span: 8,
    },
  },

];
